package com.ykg.mapper;

import com.ykg.pojo.Contract;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 *
 * 实体类：合同
 * Created on 2021/6/21 19:08.
 *
 * @Author: zetong
 * @Description:
 */
@Mapper
@Repository
public interface ContractMapper {
    //查询所有合同
    List<Contract> findAll();

    //根据合同编号查询合同
    Contract findById(String id);

    //根据船编号查询合同
    List<Contract> findByShipId(Long shipId);

    //根据货主id查询合同
    List<Contract> findByOwnerId(Long ownerId);

    //根据卸货清单编号查询合同
    Contract findByListId(String listId);

    //增加合同
    int insertContract(Contract contract);


    //审核通过合同
    int updateContract(String contractId, Date beginDate,Date endDate,float earnestmoney,float surrendermoney,float handlingcharges);
}
